﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Person
{
    public class AccountingObject : BusinessObject
    {
        public AccountingObject()
        {
            AddRule(new ValidateRequired("AccountingObjectCode"));
            AddRule(new ValidateLength("AccountingObjectCode", 0, 20));

            AddRule(new ValidateRequired("AccountingObjectName"));
            AddRule(new ValidateLength("AccountingObjectName", 0, 255));

            AddRule(new ValidateRequired("RestaurantId"));

            AddRule(new ValidateEmail("EmailAddress"));

            AddRule(new ValidateEmail("ContactEmail"));
        }

        public AccountingObject(string accountingObjectId, string accountingObjectCode, string accountingObjectName, string accountingObjectCategoryId,
                                    string restaurantId, string prefix, string address, string tel, string fax, string emailAddress, string website,
                                    string companyTaxCode, DateTime birthDate, DateTime firedDate, string description, string contactName,
                                    string jobCandidateName, bool contactSex, string contactMobile, string contactEmail,
                                    string contactHomeTel, string contactAddress, bool isPersonal, string identificationNumber, DateTime issueDate,
                                    string issueBy, bool isVendor, bool isCustomer, bool isEmployees, string countryRegion, string province,
                                    string district, string village, bool isActive, string departmentId)
            : this()
        {
            AccountingObjectID = accountingObjectId;
            AccountingObjectCode = accountingObjectCode;
            AccountingObjectName = accountingObjectName;
            AccountingObjectCategoryId = accountingObjectCategoryId;
            RestaurantId = restaurantId;
            Prefix = prefix;
            Address = address;
            Fax = fax;
            EmailAddress = emailAddress;
            Website = website;
            CompanyTaxCode = companyTaxCode;
            BirthDate = birthDate;
            FiredDate = firedDate;
            Description = description;
            ContactName = contactName;
            JobCandidateName = jobCandidateName;
            ContactSex = contactSex;
            ContactMobile = contactMobile;
            ContactEmail = contactEmail;
            ContactHomeTel = contactHomeTel;
            ContactAddress = contactAddress;
            IsPersonal = isPersonal;
            IdentificationNumber = identificationNumber;
            IssueDate = issueDate;
            IssueBy = issueBy;
            IsVendor = isVendor;
            IsCustomer = isCustomer;
            IsEmployess = isEmployees;
            CountryRegion = countryRegion;
            Province = province;
            District = district;
            Village = village;
            IsActive = isActive;
            DepartmentID = departmentId;
        }

        public string AccountingObjectID { get; set; }

        public string AccountingObjectCode { get; set; }

        public string AccountingObjectName { get; set; }

        public string AccountingObjectCategoryId { get; set; }

        public string RestaurantId { get; set; }

        public string Prefix { get; set; }

        public string Address { get; set; }

        public string Tel { get; set; }

        public string Fax { get; set; }

        public string EmailAddress { get; set; }

        public string Website { get; set; }

        public string CompanyTaxCode { get; set; }

        public DateTime BirthDate { get; set; }

        public DateTime FiredDate { get; set; }

        public string Description { get; set; }

        public string ContactName { get; set; }

        public string JobCandidateName { get; set; }

        public bool ContactSex { get; set; }

        public string ContactMobile { get; set; }

        public string ContactEmail { get; set; }

        public string ContactHomeTel { get; set; }

        public string ContactAddress { get; set; }

        public bool IsPersonal { get; set; }

        public string IdentificationNumber { get; set; }

        public DateTime IssueDate { get; set; }

        public string IssueBy { get; set; }

        public bool IsVendor { get; set; }

        public bool IsCustomer { get; set; }

        public bool IsEmployess { get; set; }

        public string CountryRegion { get; set; }

        public string Province { get; set; }

        public string District { get; set; }

        public string Village { get; set; }

        public bool IsActive { get; set; }

        public string DepartmentID { get; set; }
    }
}
